package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MmItemPriceCustGroup generated by hbm2java
 */
@Entity
@Table(name="mm_item_price_cust_group"
    ,catalog="ncsc_erp"
)
public class MmItemPriceCustGroup  implements java.io.Serializable {


     private MmItemPriceCustGroupId id;
     private SdCustGroup sdCustGroup;
     private MmItem mmItem;
     private BigDecimal itemPrice;

    public MmItemPriceCustGroup() {
    }

    public MmItemPriceCustGroup(MmItemPriceCustGroupId id, SdCustGroup sdCustGroup, MmItem mmItem, BigDecimal itemPrice) {
       this.id = id;
       this.sdCustGroup = sdCustGroup;
       this.mmItem = mmItem;
       this.itemPrice = itemPrice;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="itemNo", column=@Column(name="ITEM_NO", nullable=false) ), 
        @AttributeOverride(name="custGroupNo", column=@Column(name="CUST_GROUP_NO", nullable=false) ) } )
    public MmItemPriceCustGroupId getId() {
        return this.id;
    }
    
    public void setId(MmItemPriceCustGroupId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_GROUP_NO", nullable=false, insertable=false, updatable=false)
    public SdCustGroup getSdCustGroup() {
        return this.sdCustGroup;
    }
    
    public void setSdCustGroup(SdCustGroup sdCustGroup) {
        this.sdCustGroup = sdCustGroup;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ITEM_NO", nullable=false, insertable=false, updatable=false)
    public MmItem getMmItem() {
        return this.mmItem;
    }
    
    public void setMmItem(MmItem mmItem) {
        this.mmItem = mmItem;
    }

    
    @Column(name="ITEM_PRICE", nullable=false, precision=15)
    public BigDecimal getItemPrice() {
        return this.itemPrice;
    }
    
    public void setItemPrice(BigDecimal itemPrice) {
        this.itemPrice = itemPrice;
    }




}


